package com.geek.water.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 全局阶梯水费配置实体
 * @author yangwenqi
 * @date 2025/8/7
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("global_water_price_tier")
@ApiModel(description = "全局阶梯水费配置表")
public class GlobalWaterPriceTier implements Serializable {

    @ApiModelProperty("主键ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("阶梯名称")
    @TableField("tier_name")
    private String tierName;

    @ApiModelProperty("最小用水量（吨）")
    @TableField("min_usage")
    private BigDecimal minUsage;

    @ApiModelProperty("最大用水量（吨），null表示无上限")
    @TableField("max_usage")
    private BigDecimal maxUsage;

    @ApiModelProperty("单价（元/吨）")
    @TableField("unit_price")
    private BigDecimal unitPrice;

    @ApiModelProperty("阶梯排序")
    @TableField("sort_order")
    private Integer sortOrder;

    @ApiModelProperty("是否启用")
    @TableField("is_active")
    private Boolean isActive;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updatedAt;
}